/* main.c */

#include <stdio.h>

#include "board.h"
#include "sdcard_spi.h"

extern SDC_SPIHwDrv_T sdcard_spi_spi_hw_driver;
SDC_Info_T sdcard_info;

int main(void)
{
    uint8_t ch;
    bool err;

    board_init();

    printf("hello, world.\r\n");

    SDC_Install(&sdcard_spi_spi_hw_driver);
    err = SDC_InitCard(&sdcard_info);
    if (err)
    {
      printf("card type: %d\r\n", sdcard_info.CardType);
      printf("block count: %d\r\n", sdcard_info.CardBlkCnt);
    }
    else
    {
      printf("SDC_InitCard() failed.\r\n");
    }

    while (1)
    {
        ch = getchar();
        putchar(ch);
    }
}
/* EOF. */

